import enLocale from "./en";
import cnLocale from "./cn";
import { createI18n } from "vue-i18n";
import VueCookies from "vue-cookies";


const messages = {
  zh_CN: {
    ...cnLocale,
  },
  en_US: {
    ...enLocale,
  },
};

export default createI18n({
  locale:  VueCookies.get("frontend_lang")||'en_US',
  fallbackLocale: "en_US",
  messages,
  allowComposition: true,
  legacy: false
});
